<template>
  <el-container> <!--direction="vertical" 垂直排版-->
    <!--left-->
    <el-aside width="70%">
      <el-row v-for="(item,i) in badList">
        <el-col :span="24">
          <el-card class="box-card" shadow="hover">
            <div class="text item" ><!--作者info:1头像 2名字 3签名-->
              <el-avatar shape="square" :size="`small`"
                         :src="`https://cube.elemecdn.com/9/c2/f0ee8a3c7c9638a54940382568c9dpng.png`"></el-avatar>
              <span>{{`作者头像名字`+item.id}}</span>
              <span>{{item.title}}</span>
              <!--关注按钮-->
              <el-button style="float: right; padding: 10px 10px" type="warning" icon="el-icon-plus" plain>关注
              </el-button>
              {{'card内容'}}
            </div>
          </el-card>
        </el-col>
      </el-row>
    </el-aside>
    <!--right-->
    <el-main>
      <el-row>
        <el-col :span="24">
          <el-card class="box-card">
            <span>card 1: 内容待定</span>
          </el-card>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-card class="box-card">
            card 2: 内容待定
          </el-card>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-card class="box-card">
            广告
          </el-card>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-card class="box-card">
            card 3: 内容待定
          </el-card>
        </el-col>
      </el-row>
    </el-main>
  </el-container>
</template>

<script>
  import {getPage} from './env/service'

  export default {
    name: "badMainList",
    data() {
      return {
        badList: [],
      }
    },
    mounted() {
      //this.test();
    },
    created() {
      this.getPage();
    },
    methods: {
      // 登录
      getPage() {
        let _this = this
        getPage(null, '登录', function (res) {
          _this.badList = res.result.data;
          console.log(res)
          // _this.$router.push('/home')
        })
      },
    }
  }
</script>

<style scoped>
  .el-card {
    margin-bottom: 20px;
    /*下边距*/
  }

  .clearfix:before,
  .clearfix:after {
    display: table;
    content: "";
  }

  .clearfix:after {
    clear: both
  }
</style>
